Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bun package manager #11267

Merged
merged 4 commits into from
Jan 13, 2025
Merged

Add bun package manager #11267

merged 4 commits into from
Jan 13, 2025

Conversation

markhallen
Copy link
Contributor

@markhallen markhallen commented Jan 10, 2025

What are you trying to accomplish?

As a first step towards adding support for Bun we are adding the BunPackageManager class and extracting package managers into their own files.

Anything you want to highlight for special attention from reviewers?

For wider context you can check #11209 or #11248

The ultimate plan is to use a new structure for multiple Javascript ecosystems similar to #1862.

This PR was put together before the change in approach. It was decided that we proceed with these PR's as-is.

We will then follow-up with a PR migrating to the new structure. This migration PR will then serve as an example for the migration of the other Javascript ecosystems.

How will you know you've accomplished your goal?

The old specs should pass after the file structure changes and the new specs should pass for the new package manager.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@markhallen markhallen requested a review from a team as a code owner January 10, 2025 12:20
@markhallen markhallen force-pushed the markhallen/add-bun-package-manager branch from c51a9e0 to 7396c30 Compare January 10, 2025 12:21
@markhallen markhallen force-pushed the markhallen/add-bun-package-manager branch from 7396c30 to 71ad8dd Compare January 10, 2025 12:28
@amazimbe
Copy link
Contributor

Hey @markhallen I know you were not there yesterday but we discussed and agreed that bun will be implemented as it's own ecosystem independent of npm & yarn.

@markhallen markhallen mentioned this pull request Jan 10, 2025
5 tasks
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @markhallen,

I noticed some differences in the structures of your Bun PRs. I thought it might follow a structure similar to the one used in the Docker Compose PR.

For example, it could look like this if we follow the same approach:

  - lib/dependabot
    - common (or shared)
    - npm_and_yarn
        - file_fetcher
           ...
        - file_parser
          ....
       - file_updater
         ...
       - file_fetcher.rb
       - file_parser.rb
       - file_updater.rb
       ... so on
    - npm_and_yarn.rb
    - bun
         - file_fetcher
           ...
        - file_parser
          ....
       - file_updater
         ...
       - file_fetcher.rb
       - file_parser.rb
       - file_updater.rb
       ... so on
    - bun.rb```

If you follow this structure, you won’t need to make any changes to npm_and_yarn. Later, when we separate other package managers, we can adopt the same structure to create individual npm, pnpm, and yarn folders. This will allow us to treat them as distinct ecosystems while retaining npm_and_yarn for compatibility and managing deprecation/unsupported lifecycles.

@markhallen
Copy link
Contributor Author

Hi @markhallen,

I noticed some differences in the structures of your Bun PRs. I thought it might follow a structure similar to the one used in the Docker Compose PR.

For example, it could look like this if we follow the same approach:

  - lib/dependabot
    - common (or shared)
    - npm_and_yarn
        - file_fetcher
           ...
        - file_parser
          ....
       - file_updater
         ...
       - file_fetcher.rb
       - file_parser.rb
       - file_updater.rb
       ... so on
    - npm_and_yarn.rb
    - bun
         - file_fetcher
           ...
        - file_parser
          ....
       - file_updater
         ...
       - file_fetcher.rb
       - file_parser.rb
       - file_updater.rb
       ... so on
    - bun.rb```

If you follow this structure, you won’t need to make any changes to npm_and_yarn. Later, when we separate other package managers, we can adopt the same structure to create individual npm, pnpm, and yarn folders. This will allow us to treat them as distinct ecosystems while retaining npm_and_yarn for compatibility and managing deprecation/unsupported lifecycles.

Thanks @kbukum1

As discussed on Friday. This PR was put together before the change in approach. It was decided in the Friday standup that we proceed with these PR's as-is. We will then follow-up with a PR migrating to the new structure which will have the structure you have outlined above. This PR will then serve as an example for the migration of the other Javascript ecosystems.

@markhallen markhallen requested a review from kbukum1 January 13, 2025 09:27
@markhallen markhallen dismissed kbukum1’s stale review January 13, 2025 09:31

Thanks @kbukum1

The plan is to use the structure you have defined, but in a later PR.
As discussed on Friday. This PR was put together before the change in approach. It was decided in the Friday standup that we proceed with these PR's as-is. We will then follow-up with a PR migrating to the new structure which will have the structure you have outlined above. This PR will then serve as an example for the migration of the other Javascript ecosystems.

@markhallen markhallen merged commit 21a9544 into main Jan 13, 2025
56 checks passed
@markhallen markhallen deleted the markhallen/add-bun-package-manager branch January 13, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants